<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function changeNum() {
        let a = prompt("第一个数");
        let b = prompt("第二个数");
        let temp = a;
        a = b;
        b = temp;
        document.write(`第一个数为${a},第二个数为${b}`);
      }
      changeNum();
      changeNum();
    </script>
  </body>
</html>
